package com.chat.service;

import com.chat.Local;
import com.chat.common.Message;
import com.chat.common.MessageType;
import com.chat.common.User;

import java.io.IOException;
import java.io.ObjectOutputStream;
import java.net.Socket;

/*
   修改密码
 */
public class ResetPwd {
         public static void resetpwd(String mailbox,String pwd){
             Message message=new Message();
             message.setMesType(MessageType.MESSAGE_RESET_PWD);
             User user=new User();
             user.setMailbox(mailbox);
             user.setPassword(pwd);
             message.setData(user);
             ClientConnectServerThread clientConnectServerThread=
                     ManageClientConnectServerThread.getClientConnectServerThread(Local.user.getUsername());
             clientConnectServerThread.send(message);
         }
}
